package org.cyzy.controller;

import org.cyzy.dao.Student;
import org.cyzy.service.StudentManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/manageStudent")
public class ManageStudent {
    @Autowired
    private StudentManageService studentManage;
    @RequestMapping("/selectStudentInfo")
    List<Student> selectStudentInfo(String classCode){
        return studentManage.selectStudentInfo(classCode);
    }


    @DeleteMapping("/removeStudent")
    int removeStudent(String classCode, String studentId){

        return studentManage.removeStudent(classCode, studentId);
    }

}
